﻿<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>${fns:getConfig('productName')}</title>
<tags:import includes="ems,jqUI,jqUICss,ztree,ztreeCss,ygtree"></tags:import>
<script src="${ctxStatic}/modules/core/sysIndex.js"></script>

<script type='text/javascript' src='/webems/dwr/interface/MessagePush.js'></script>
<script type='text/javascript' src='/webems/dwr/engine.js'></script>
<script type='text/javascript' src='/webems/dwr/util.js'></script>


<script type="text/javascript">
var _name = 'sysIndex';
var domMenu = '${domMenu}';
function refreshAll(){
	location.reload();
}
</script>
</head>
<body>
	<form>
		<div id="mainMenuBar" class="navbar navbar-default  navbar-fixed-top">
			<div class="navbar-inner">
				<div class="container">
					<a class="brand" href="#">Web EMS</a>
					<ul class="nav nav-pills" style="margin-top: 7px;">
						
					</ul>
					<ul class="nav pull-right"
						style="margin-top: 5px; margin-right: -57px;">
						<li>
							<p>
								<span id="alertInfo" style="width: 38px"
									class="btn label-red btn-sm tooltip-alert" data-rel="popover"
									data-placement="bottom" title="紧急"
									data-content="当前有${allCount1 }条紧急告警" ondblclick="openAlarmTab();">${allCount1 }</span>
								<span id="alertInfo" style="width: 38px"
									class="btn label-orange btn-sm tooltip-warning"
									data-rel="popover" data-placement="bottom" title="主要"
									data-content="当前有${allCount2 }条主要告警" ondblclick="openAlarmTab();">${allCount2 }</span>
								<span id="alertInfo" style="width: 38px"
									class="btn label-yellow btn-sm" data-rel="popover"
									data-placement="bottom" title="次要"
									data-content="当前有${allCount3 }条次要告警" ondblclick="openAlarmTab();">${allCount3 }</span>
								<span id="alertInfo" style="width: 38px"
									class="btn label-purple tooltip-purple btn-sm"
									data-rel="popover" data-placement="bottom" title="提示"
									data-content="当前有${allCount4 }条提示信息" ondblclick="openAlarmTab();">${allCount4 }</span>
								<span id="alertInfo" style="width: 38px"
									class="btn label-grey tooltip-grey btn-sm"
									data-rel="popover" data-placement="bottom" title="离线"
									data-content="当前有${allCount0 }条离线信息" ondblclick="openAlarmTab();">${allCount0 }</span>
							</p>
						</li>
						<li class="divider-vertical"></li>
						<li class="dropdown"><a href="#" class="dropdown-toggle"
							data-toggle="dropdown"> admin <b class="caret"></b></a>
							<ul
								class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
								<li><a href="#"> <i class="icon-cog"></i> 设置
								</a></li>
								<li><a href="#"> <i class="icon-user"></i> 个人资料
								</a></li>
								<li class="divider"></li>
								<li><a href="${ctx}/logout"> <i class="icon-off"></i>
										退出
								</a></li>
							</ul></li>
					</ul>
				</div>
			</div>
		</div>
		<div class="container-fluid" style="display: block;">
			<div class="row-fluid">
				<!-- Left Navigator Start -->
				<div id="leftContainer"
					style="left: 3px; padding-top: 51px; float: left; border: 1px solid #ddd; height: 699px;">
					<div id="accordion" class="accordion-style"
						style="float: left; width: 218px;">
						<div class="group">
							<h3 class="accordion-header">资源管理</h3>
							<div>
								<ul id="treeTopoResouce" style="width: 133%;margin-left: -30px;"class="ztree"></ul>
							</div>
						</div>
						<div class="group">
							<h3 class="accordion-header">快捷导航</h3>
							<div>
								<ul class="dropdown-menu">
									<li><a mid="mNav1" class="menu_item"
										url="${ctx}/core/index/cardConfig">配置网元</a></li>
									<li><a mid="mNav2" class="menu_item"
										url="${ctx}/core/index/cardConfig">配置板卡</a></li>
									<li><a mid="mNav3" class="menu_item"
										url="${ctx}/core/index/cardConfig">配置板卡类型</a></li>
								</ul>
							</div>
						</div>

						<div class="group">
							<h3 class="accordion-header">系统</h3>
							<div>
								<p>Nam enim risus, molestie et, porta ac, aliquam ac, risus.
									Quisque lobortis. Phasellus pellentesque purus in massa. Aenean
									in pede. Phasellus ac libero ac tellus pellentesque semper. Sed
									ac felis. Sed commodo, magna quis lacinia ornare, quam ante
									aliquam nisi, eu iaculis leo purus venenatis dui.</p>

								<ul>
									<li>List item one</li>
									<li>List item two</li>
									<li>List item three</li>
								</ul>
							</div>
						</div>
						<!-- #accordion -->
					</div>

					<!-- Hidden handler -->
					<div id="leftNavHandler" select="true"
						style="padding-left: 1; padding-top: 19px; margin-top: 90%; float: left; background-color: #C8C8C8; width: 10px; height: 53px; cursor: hand;">
						<span id='leftNavFlag'><</span>
					</div>

				</div>
				<!-- Left Navigator  End-->


				<!-- Main Content -->
				<div id="mainContent"
					style="float: left; height: 650px; margin-left: 2px; margin-top: 50px;">
					<!--Demo-->
					<ul id="tab_nav" class="nav nav-tabs">
						<li><a href="#tabs-topo" data-toggle="tab">拓扑管理</a></li>
					</ul>
					<div id="tab_cont" style="height: 610px;" class="tab-content">
						<div class="tab-pane active" id="tabs-topo">
							<iframe id="netTopoFrame" name="netTopoFrame"
								src="${ctx}/topo/index" style="overflow: visible;"
								scroll="no" frameborder="no" width="100%" height="578px;"></iframe>
						</div>
					</div>
					<!-- End core -->
				</div>
				<!-- Main Content End -->
			</div>
			<!-- Spacer -->
			<div style="height:10px"></div>
			<!-- Table -->
			<div id="containerTable"  class="row-fluid">
				<!-- 表格隐藏，悬浮框 -->
				<div id="tableHandler" select="false"
					class="alertTable"  style="display:none;width: 38px" >
					<i id="tableIcon" style="display:none" class="icon-upload-alt"></i>
				</div>
				<table id="contentTable" style="margin-left: -9px; width: 102%;background-color:#FFFFFF;" class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								<th style="text-align: center;">级别</th>
								<th>告警量</th>
								<th>Trap类型</th>
								<th>所属站点</th>
								<th>所属网元_temp</th>
								<th>槽位</th>
								<th>板卡</th>
								<th>发生时间</th>
<!-- 								<th>确认时间</th> -->
<!-- 								<th>清除时间</th> -->
<!-- 								<th>板卡编号</th> -->
								<th>操作</th>
								<th  style='display:none'></th>
							</tr>
						</thead>
						<tbody id="tbodyHtml">
						  <c:forEach items="${alist}" var="ainfo">
							<tr alarmId="${ainfo.id }">
							    <td style="text-align: center;">
							    <c:choose>
							    	<c:when test="${ainfo.severity.id==1}">
							    		<span class="label label-red">&nbsp;${ainfo.severity.severity}&nbsp;&nbsp;</span>
							    	</c:when>
							    	<c:when test="${ainfo.severity.id==2}">
							    		<span class="label label-orange">&nbsp;${ainfo.severity.severity}&nbsp;&nbsp;</span>
							    	</c:when>
							    	<c:when test="${ainfo.severity.id==3}">
							    		<span class="label label-yellow">&nbsp;${ainfo.severity.severity}&nbsp;&nbsp;</span>
							    	</c:when>
							    	<c:when test="${ainfo.severity.id==4}">
							    		<span class="label label-purple">&nbsp;${ainfo.severity.severity}&nbsp;&nbsp;</span>
							    	</c:when>
							    	<c:otherwise>
							    		<span class="label label-grey">&nbsp;${ainfo.severity.severity}&nbsp;&nbsp;</span>
							    	</c:otherwise>
							    </c:choose>
								  
								</td>
								<td>${ainfo.aid}</td>
								<td>${ainfo.traptype.traptype}</td>
								<td>${ainfo.nenode.site.sname}</td>
								<td>${ainfo.nenode.ip}</td>
								<td>${ainfo.slot.num}</td>
								<td>${ainfo.slot.card.cardname}</td>
								<td>${ainfo.atime}</td>
<!-- 								<td>2014-08-13 02:51_temp</td> -->
<!-- 								<td>2014-08-20 14:10_temp</td> -->
<!--  								<td>_temp</td>  需加入对板卡的生产信息对应关系 -->
								<td><a name="linkoper" style="cursor:hand;">more...</a></td>
								<td style='display:none'>${ainfo.nenode.site.sid}_${ainfo.nenode.nid}_${ainfo.slot.slotid}</td>
							</tr>
                           </c:forEach>							
						</tbody>
					</table>
					<!-- Table -->
					<br> <br> <br>
			</div>
			<!-- /.row -->
		</div>

		<div class="navbar navbar-default  navbar-fixed-bottom">
			<div class="navbar-inner">
				<div class="container" style="margin-top: 10px; margin-left: 0px;">
					<div id="statusCardName" class="col-sm-3">
						<span>名称</span>&nbsp;:&nbsp;<a class="text-success">EDFA PA</a>
					</div>
					<div id="statusCardTemp" class="col-sm-3">
						<span>温度</span>&nbsp;:&nbsp;<a class="text-success">25℃</a>
					</div>
					<div id="statusCardStatus" class="col-sm-3">
						<span>状态</span>&nbsp;:&nbsp;&nbsp;&nbsp;<span
							class="label label-green">在线</span>
					</div>
					<div class="col-sm-3">
						<span>全屏模式</span>&nbsp;:&nbsp; <label> <input
							id="chkWorkMode" name="form-field-checkbox"
							class="ace ace-checkbox-2" type="checkbox"> <span
							class="lbl"></span>
						</label>
					</div>
					<!-- <div class="col-sm-3" style="margin-right: -326px;">
						@2014 <a href="http://www.oplink.com">OPLINK</a> Communications Inc.
						All Rights Reserved.
					</div> -->
				</div>
			</div>
		</div>
	</form>		
	<div id="modalProgress" class="modal fade" tabindex="-1" role="dialog"
		aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-body">
				<div class="progress progress-striped active">
					<div id="progressBar" class="bar" style="width: 0%;"></div>
				</div>
				<span id="progressText">初始化中......</span>
		</div>
	</div>
	<script type="text/javascript">
	</script>	
</body>
</html>